import { httpPost, httpGet, httpDel, httpPut } from '../index'

export function page (query) {
    return httpGet('/api/${moduleName}/${className?uncap_first}/page', query)
}

export function addObj (obj) {
    return httpPost('/api/${moduleName}/${className?uncap_first}', obj)
}

export function getObj (id) {
    return httpGet('/api/${moduleName}/${className?uncap_first}/' + id)
}

export function delObj (id) {
    return httpDel('/api/${moduleName}/${className?uncap_first}/' + id)
}

export function putObj (id, obj) {
    return httpPut('/api/${moduleName}/${className?uncap_first}/' + obj.id, obj)
}

export function exportObjs (format) {
    let data = { format }
    return httpGet('/api/${moduleName}/${className?uncap_first}/export', data)
}
